home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Microsoft Plateform / Visual Basic 5.0 / Msvb50.ace / msvb50 / MSVB50 / VB / SAMPLES / VISDATA / NEWPW.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-16  |  4.4 KB  |  153 lines

  1. VERSION 5.00
  2. Begin VB.Form frmNewPassword 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Set Password"
  5.    ClientHeight    =   1995
  6.    ClientLeft      =   3645
  7.    ClientTop       =   3540
  8.    ClientWidth     =   3750
  9.    BeginProperty Font 
  10.       Name            =   "Tahoma"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    Height          =   2460
  19.    HelpContextID   =   2016136
  20.    Icon            =   "NEWPW.frx":0000
  21.    Left            =   3585
  22.    LinkTopic       =   "Form1"
  23.    LockControls    =   -1  'True
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   1995
  27.    ScaleWidth      =   3750
  28.    ShowInTaskbar   =   0   'False
  29.    StartUpPosition =   1  'CenterOwner
  30.    Top             =   3135
  31.    Width           =   3870
  32.    Begin VB.TextBox txtVerify 
  33.       Height          =   285
  34.       Left            =   120
  35.       MaxLength       =   20
  36.       PasswordChar    =   "*"
  37.       TabIndex        =   5
  38.       Top             =   1560
  39.       Width           =   1695
  40.    End
  41.    Begin VB.CommandButton cmdCancel 
  42.       Cancel          =   -1  'True
  43.       Caption         =   "&Cancel"
  44.       Default         =   -1  'True
  45.       Height          =   375
  46.       Left            =   2040
  47.       MaskColor       =   &H00000000&
  48.       TabIndex        =   7
  49.       Top             =   960
  50.       Width           =   1575
  51.    End
  52.    Begin VB.CommandButton cmdOK 
  53.       Caption         =   "&OK"
  54.       Height          =   375
  55.       Left            =   2040
  56.       MaskColor       =   &H00000000&
  57.       TabIndex        =   6
  58.       Top             =   360
  59.       Width           =   1575
  60.    End
  61.    Begin VB.TextBox txtNewPW 
  62.       Height          =   285
  63.       Left            =   120
  64.       MaxLength       =   20
  65.       PasswordChar    =   "*"
  66.       TabIndex        =   3
  67.       Top             =   960
  68.       Width           =   1695
  69.    End
  70.    Begin VB.TextBox txtOldPW 
  71.       Height          =   285
  72.       Left            =   120
  73.       PasswordChar    =   "*"
  74.       TabIndex        =   1
  75.       Top             =   360
  76.       Width           =   1695
  77.    End
  78.    Begin VB.Label lblLabels 
  79.       AutoSize        =   -1  'True
  80.       Caption         =   "Verify:"
  81.       Height          =   195
  82.       Index           =   2
  83.       Left            =   120
  84.       TabIndex        =   4
  85.       Top             =   1320
  86.       Width           =   480
  87.    End
  88.    Begin VB.Label lblLabels 
  89.       AutoSize        =   -1  'True
  90.       Caption         =   "New Password:"
  91.       Height          =   195
  92.       Index           =   1
  93.       Left            =   120
  94.       TabIndex        =   2
  95.       Top             =   720
  96.       Width           =   1110
  97.    End
  98.    Begin VB.Label lblLabels 
  99.       AutoSize        =   -1  'True
  100.       Caption         =   "Old Password:"
  101.       Height          =   195
  102.       Index           =   0
  103.       Left            =   120
  104.       TabIndex        =   0
  105.       Top             =   120
  106.       Width           =   1035
  107.    End
  108. Attribute VB_Name = "frmNewPassword"
  109. Attribute VB_Base = "0{529A44AD-C9E1-11CF-9ED2-00AA00574745}"
  110. Attribute VB_GlobalNameSpace = False
  111. Attribute VB_Creatable = False
  112. Attribute VB_TemplateDerived = False
  113. Attribute VB_PredeclaredId = True
  114. Attribute VB_Exposed = False
  115. Attribute VB_Customizable = False
  116. Option Explicit
  117. '>>>>>>>>>>>>>>>>>>>>>>>>
  118. Const FORMCAPTION = "Set Password"
  119. Const BUTTON1 = "&OK"
  120. Const BUTTON2 = "&Cancel"
  121. Const Label1 = "&Old Password:"
  122. Const Label2 = "&New Passsord:"
  123. Const LABEL3 = "&Verify:"
  124. Const MSG1 = "Invalid New Password Verification, try again."
  125. '>>>>>>>>>>>>>>>>>>>>>>>>
  126. Private Sub cmdCancel_Click()
  127.   Unload Me
  128. End Sub
  129. Private Sub cmdOK_Click()
  130.   On Error GoTo OKErr
  131.   Dim sTmp As String
  132.   Dim usr As User
  133.   If txtNewPW.Text <> txtVerify.Text Then
  134.     Beep
  135.     MsgBox MSG1, 48
  136.     txtVerify.SetFocus
  137.     Exit Sub
  138.   End If
  139.   gwsMainWS.Users(gwsMainWS.UserName).NewPassword txtOldPW.Text, txtNewPW.Text
  140.   Unload Me
  141.   Exit Sub
  142. OKErr:
  143.   ShowError
  144. End Sub
  145. Private Sub Form_Load()
  146.   Me.Caption = FORMCAPTION
  147.   cmdOK.Caption = BUTTON1
  148.   cmdCancel.Caption = BUTTON2
  149.   lblLabels(0).Caption = Label1
  150.   lblLabels(1).Caption = Label2
  151.   lblLabels(2).Caption = LABEL3
  152. End Sub
  153.